package com.zh.autoconfigure;

import com.zh.properties.PayProperties;
import com.zh.template.PayTemplate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


// 标记配置类
@Configuration
@EnableConfigurationProperties(PayProperties.class)
// 导入配置
public class PayAutoConfiguration {

    /**
     * 支付模板
     * @param payProperties
     * @return
     */
    @Bean
    public PayTemplate payTemplate(PayProperties payProperties) {
        return new PayTemplate(payProperties);
    }
}
